<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="childrenBody">
	<form class="layui-form" style="width:80%;margin-top: 10px" th:object="${menu}">
		<input name="menuId"   type="hidden" th:field="*{menuId}"   />
		<input id="treeId" name="parentId" type="hidden" th:field="*{parentId}" />
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">上级目录</label>
			<div class="layui-input-block">
				<input type="text" name="treeName" id="treeName" readonly="readonly" class="layui-input treeName" lay-verify="required" th:value="${menu.parentName == null ? '无' : menu.parentName}">
			</div>
		</div>
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">菜单类型</label>
			<div class="layui-input-block">
				<input  type="radio" class="menuType" th:field="*{menuType}" lay-filter="rchange" name="menuType" value="M" title="目录">
				<input  type="radio" class="menuType" th:field="*{menuType}" lay-filter="rchange" name="menuType" value="C" title="菜单">
				<input  type="radio" class="menuType" th:field="*{menuType}" lay-filter="rchange" name="menuType" value="F" title="按钮">
			</div>
		</div>
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">菜单名称</label>
			<div class="layui-input-block">
				<input type="text" name="menuName" id="menuName" th:field="*{menuName}" class="layui-input menuName" lay-verify="required" >
			</div>
		</div>
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">请求地址</label>
			<div class="layui-input-block">
				<input type="text" name="url"  id="url" class="layui-input url" th:field="*{url}">
			</div>
		</div>
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">权限标识</label>
			<div class="layui-input-block">
				<input type="text" name="perms" id="perms" class="layui-input perms" th:field="*{perms}">
			</div>
		</div>
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">显示排序</label>
			<div class="layui-input-block">
				<input type="number" name="orderNum" id="orderNum" th:field="*{orderNum}" class="layui-input orderNum" lay-verify="required">
			</div>
		</div>
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">图标</label>
			<div class="layui-input-block">
				<input type="text" name="icon" id="icon" th:field="*{icon}" class="layui-input icon" placeholder="选择图标">
			</div>
		</div>
		<div class="layui-form-item layui-row layui-col-xs12">
			<div class="layui-input-block">
				<button class="layui-btn " lay-submit="" lay-filter="add">提交</button>
				<button type="button" class="layui-btn  layui-btn-primary close">取消</button>
			</div>
		</div>
	</form>
	<div th:include="include::footer"></div>
	<script th:src="@{/js/menu/edit.js}"></script>
</body>
</html>